package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbDutyModelId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbDutyModelId implements java.io.Serializable {

	// Fields

	private Integer smId;
	private short udId;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public TbDutyModelId() {
	}

	/** full constructor */
	public TbDutyModelId(Integer smId, short udId, Integer corpId) {
		this.smId = smId;
		this.udId = udId;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "sm_id")
	public Integer getSmId() {
		return this.smId;
	}

	public void setSmId(Integer smId) {
		this.smId = smId;
	}

	@Column(name = "ud_id")
	public short getUdId() {
		return this.udId;
	}

	public void setUdId(short udId) {
		this.udId = udId;
	}

	@Column(name = "corp_id")
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbDutyModelId))
			return false;
		TbDutyModelId castOther = (TbDutyModelId) other;

		return ((this.getSmId() == castOther.getSmId()) || (this.getSmId() != null
				&& castOther.getSmId() != null && this.getSmId().equals(
				castOther.getSmId())))
				&& (this.getUdId() == castOther.getUdId())
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSmId() == null ? 0 : this.getSmId().hashCode());
		result = 37 * result + this.getUdId();
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}